package cx.hoffmann.bab.server.db;

import org.apache.log4j.Logger;

/**
 * Created by IntelliJ IDEA.
 * User: lasombra
 * Date: 2009/09/19
 * Time: 12:35:45 PM
 */

public class Main
{
	private static Logger log = Logger.getLogger( Main.class );

	private static String driver = "org.apache.derby.jdbc.EmbeddedDriver";
//	private static String dbName = "derbyDbTesting";
//	private static String url = "jdbc:derby:" + dbName + ";create=true";
//	private static Connection conn = null;
//	private static Statement stmt;
//	private static ResultSet rs;
//	private static String createString = "CREATE TABLE WISH_LIST  "
//        +  "(WISH_ID INT NOT NULL GENERATED ALWAYS AS IDENTITY "
//        +  "   CONSTRAINT WISH_PK PRIMARY KEY, "
//        +  " ENTRY_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "
//        +  " WISH_ITEM VARCHAR(32) NOT NULL) " ;
//	private static String answer;

	public static void start()
	{
		try
		{
			Class.forName( driver );
			log.info( driver + " loaded." );
		}
		catch( ClassNotFoundException ex )
		{
			log.error( "Derby DB driver was not found on the CLASSPATH" );
			log.error( ex );
		}

	}
}
